// 什么是抽象类？  为子类服务的类型   类似接口 在 抽象类中定义的属性 在子类中必须存在
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
// 首先，抽象类是不允许被实例化的：
var Y = /** @class */ (function () {
    function Y(name22) {
        this.name22 = name22; //报错
    }
    return Y;
}());
// const y = new Y()无法创建抽象类的实例
var Dogg = /** @class */ (function (_super) {
    __extends(Dogg, _super);
    function Dogg(name1) {
        var _this = _super.call(this, name1) || this;
        _this.name1 = name1;
        return _this;
    }
    Dogg.prototype.sayhi = function () {
        console.log(222);
    };
    return Dogg;
}(Y));
var d = new Dogg("小狗");
console.log(d.name22);
console.log(d.name1);
d.sayhi();
